extends Node2D
#chapter0

var chara
var first=true

func _ready():
	chara={"sys0":load("res://data/images/sys0.png")}
	d.wait_time_list=[1,0.5,0.1]
	gm_load()
	if(i.keys.debug):
		$"/root/2d0/tdebug/debug".show()
	else:
		$"/root/2d0/tdebug/debug".hide()
	if(first):
		d.speak([[chara["sys0"],[["您好,user0./w2\n我是system0,很高兴为您服务.",0.05,true],["这是您首次运行该程序,我将会为您创建新归档.",0.05,true]]]],[])
	else:
		d.speak([[chara["sys0"],[["您好,user0./w2\n我是system0,很高兴为您服务.",0.05,true],["检测到存在归档,接下来为您加载.",0.05,true]]]],[])

func _draw():
	pass

func _process(delta):
	if(i.keys.debug):
		dlog_s(i.keys)
	sys.update()

func gm_load():
	pass

func gm_save():
	pass

func dlog(text):
	$"/root/2d0/tdebug/debug".add_text(String(text))

func dlog_s(text):
	$"/root/2d0/tdebug/debug".text=String(text)

func dclear():
	$"/root/2d0/tdebug/debug".clear()
